import http from './http.ts'
// 秒杀活动接口
export const ApiFlashH = (params: IQueryUserListParams): RSP<IFlash> => http.get(`/flash/list`, {params})

//上线下线接口
export const ApiFlashStatus=(params:FlasSEerg):RSP<any>=>http.post(`/flash/update/status/${params.id}?status=${params.status}`,params)

//  删除活动接口
export const ApiDeletsFlash = (id:number):RSP<any> => http.post(`/flash/delete/${id}`)

// 秒杀时间段列表接口
export const ApiflashSession = (): RSP<FlashSession> => http.get(`/flashSession/list`)

// 秒杀活动的编辑活动接口
export const ApiFlashUpData = (params: any): RSP<any> => http.post(`/flash/update/${params.id}`)

// 秒杀活动的添加 的接口
export const ApiFlashCreate =()=>http.post(`/flash/create
`) 



// 秒杀时间段列表内的启用状态的接口
export const ApiFlashSesssinUpData = (params: FlasSEerg): RSP<any> => http.post(`/flashSession/update/status/${params.id}?status=${params.status}`)



// 设置商品按钮接口
export const Apisession = (flashPromotionId:number): RSP<any> => http.get(`/flashSession/selectList?flashPromotionId=${flashPromotionId}`)


// 商品列表接口
export const ApiflashProductRelationList=(params:any): RSP<any>=>http.get(`/flashProductRelation/list`,{params})

// 秒杀时间段内的删除接口

export const ApiFalshSessibobn=(id:number):RSP<any>=>http.post(`/flashSession/delete/${id}
`)

// 品牌推荐
export const ApiHomeBrand = (params: any): RSP<any> => http.get(`/brand/list`, { params })


// 优惠券
export const ApiCouponList = (params: any): RSP<any> => http.get(`/coupon/list`, { params })

// 删除品牌
export const Apibranddelete = (params: any) => http.get(`brand/delete/${params.id}`)

// 排序
export const Apibrandupdatesort=(params:any)=>http.post (`/brand/update/sort/${params.id}?sort=${params.sort}&id=${params.id}
`)
